{extend name="layout/iframe" /}

{block name="content"}
<div class="x-body">
    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">
                <span class="x-red">*</span>姓名
            </label>
            <div class="layui-input-inline">
                <input type="text" name="name" required="" lay-verify="required" autocomplete="off" value="" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="loginName" class="layui-form-label">
                <span class="x-red">*</span>登录名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="loginName" name="loginName" required="" lay-verify="loginName" autocomplete="off" value="" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>将会成为您唯一的登入名
            </div>
        </div>
        <div class="layui-form-item">
            <label for="phone" class="layui-form-label">
                手机
            </label>
            <div class="layui-input-inline">
                <input type="text" value="" id="phone" name="phone" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="x-red">*</span>角色</label>
            <div class="layui-input-block">
                {foreach name="roles" item="role" key="key"}
                    <input type="checkbox" name="roleIds[]" required="" lay-verify="roleIds" lay-skin="primary" title="{$role.name}" value="{$role.id}">
                    <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                        <span>{$role.name}</span><i class="layui-icon"></i>
                    </div>
                {/foreach}
            </div>
        </div>
        <div class="layui-form-item">
            <label for="password" class="layui-form-label">
                <span class="x-red">*</span>密码
            </label>
            <div class="layui-input-inline">
                <input type="password" id="password" name="password" required="" lay-verify="password" autocomplete="off" class="layui-input">
            </div>
            <div class="layui-form-mid layui-word-aux">
                6到16个字符
            </div>
        </div>
        <div class="layui-form-item">
            <label for="rePassword" class="layui-form-label">
                <span class="x-red">*</span>确认密码
            </label>
            <div class="layui-input-inline">
                <input type="password" id="rePassword" name="rePassword" required="" lay-verify="rePassword" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                备注
            </label>
            <div class="layui-input-inline">
                <textarea placeholder="请输入内容" id="desc" name="remark" class="layui-textarea"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button class="layui-btn" lay-filter="add" lay-submit="">
                增加
            </button>
        </div>
    </form>
</div>

<script>
    var save_url = "{:url('admin/operator/savePost')}";
</script>
<script src="__STATIC__/admin/pages/js/operator.js" type="text/javascript"></script>
{/block}